/* Algarrobal — marketing kit styles */
@import url("../../colors_and_type.css");

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--color-bg-page);
  color: var(--color-fg-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-loose);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* layout */
.alg-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 768px) { .alg-container { padding: 0 48px; } }

.alg-section { padding: 96px 0; }
@media (max-width: 767px) { .alg-section { padding: 64px 0; } }

.alg-section-dark {
  background: var(--pizarra-900);
  color: var(--color-fg-inverse);
}
.alg-on-dark { color: var(--pergamino-100); }
.alg-on-dark-muted { color: rgba(247,243,236,0.72); }

.alg-eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--algarrobo-700);
  margin: 0 0 16px;
}
.alg-eyebrow-light { color: var(--algarrobo-200); }

.alg-section-head { max-width: 720px; margin: 0 0 56px; }
.alg-section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--color-fg-primary);
  margin: 0 0 16px;
}
.alg-section-title em {
  font-style: italic;
  color: var(--algarrobo-700);
}
.alg-section-dark .alg-section-title em { color: var(--algarrobo-200); }
.alg-section-lede {
  font-size: 17px;
  line-height: 1.7;
  color: var(--pizarra-500);
  margin: 0;
}

/* header */
.alg-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background-color 200ms ease, backdrop-filter 200ms ease, border-color 200ms ease;
  border-bottom: 1px solid transparent;
}
.alg-header.is-scrolled {
  background: rgba(247, 243, 236, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--color-border-subtle);
}
.alg-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 160px;
}
/* brand logo bouncy */
.alg-brand {
  display: inline-flex;
  transform-origin: left center;
}
.alg-brand img {
  height: 140px;
  width: auto;
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}
.alg-brand.is-bouncing img {
  animation: alg-logo-bounce 1100ms cubic-bezier(0.22, 1, 0.36, 1);
}
.alg-brand:hover img { transform: scale(1.04); }

@keyframes alg-logo-bounce {
  0%   { transform: scale(0.88) translateY(-4px); opacity: 0; }
  55%  { transform: scale(1.04) translateY(0); opacity: 1; }
  80%  { transform: scale(0.99) translateY(0.5px); }
  100% { transform: scale(1) translateY(0); }
}

/* bouncy primary button */
.alg-btn-bouncy {
  animation: alg-btn-pop 700ms cubic-bezier(0.34, 1.56, 0.64, 1) 200ms both;
}
.alg-btn-bouncy:hover { transform: scale(1.05); }
.alg-btn-bouncy:active { transform: scale(0.96); }

@keyframes alg-btn-pop {
  0%   { transform: scale(0.7); opacity: 0; }
  60%  { transform: scale(1.08); opacity: 1; }
  80%  { transform: scale(0.97); }
  100% { transform: scale(1); }
}
.alg-nav { display: none; gap: 32px; font-size: 14px; font-weight: 500; }
@media (min-width: 768px) { .alg-nav { display: flex; } }
.alg-nav a {
  color: var(--pizarra-700);
  position: relative;
  padding-bottom: 2px;
  transition: color 200ms ease, transform 200ms ease;
}
.alg-nav a::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 100%; height: 1px;
  background: var(--algarrobo-700);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.alg-nav a:hover { color: var(--algarrobo-700); transform: translateY(-1px); }
.alg-nav a:hover::after { transform: scaleX(1); }

/* hero */
.alg-hero {
  position: relative;
  padding: 200px 0 64px;
  overflow: hidden;
  isolation: isolate;
}
.alg-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.alg-hero-protect {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(247,243,236,0.55) 0%, rgba(247,243,236,0.35) 30%, rgba(247,243,236,0.85) 100%);
  z-index: -1;
}
.alg-hero-inner { position: relative; z-index: 1; max-width: 760px; }

/* Falling leaves */
.alg-leaves {
  position: absolute;
  top: 0; left: 0; right: 0;
  width: 100%; height: 100%;
  text-align: right;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.alg-leaves i {
  display: inline-block;
  background: linear-gradient(to bottom right, var(--hoja-300), var(--hoja-700));
  transform: skew(20deg);
  border-radius: 5% 40% 70%;
  box-shadow: inset 0 0 1px rgba(0,0,0,0.2);
  border: 1px solid rgba(0,0,0,0.1);
  animation: alg-falling 5s 0s infinite ease-in-out;
}
.alg-leaves i:nth-of-type(2n) { animation-name: alg-falling2; }
.alg-leaves i:nth-of-type(3n) { animation-name: alg-falling3; }

.alg-leaves i::before {
  position: absolute; content: '';
  transform: rotate(49deg);
  border-radius: 0% 15% 15% 0%;
  border-top: 1px solid rgba(0,0,0,0.12);
  border-bottom: 1px solid rgba(0,0,0,0.12);
  border-left: 0; border-right: 1px solid rgba(0,0,0,0.12);
  background: linear-gradient(to right, var(--hoja-600), var(--hoja-700));
}
.alg-leaves i::after {
  content: ''; display: block; position: absolute;
  background: linear-gradient(to right, rgba(0,0,0,.1), rgba(0,0,0,0));
  transform: rotate(125deg); border-radius: 50%;
}

.alg-leaves i:nth-of-type(n)        { height:23px; width:30px; }
.alg-leaves i:nth-of-type(n)::before { width:7px; height:5px; top:17px; right:1px; }
.alg-leaves i:nth-of-type(n)::after  { width:2px; height:17px; left:12px; top:0; }

.alg-leaves i:nth-of-type(2n+1)        { height:11px; width:16px; }
.alg-leaves i:nth-of-type(2n+1)::before { width:4px; height:3px; top:7px; right:0; }
.alg-leaves i:nth-of-type(2n+1)::after  { width:2px; height:6px; left:5px; top:1px; }

.alg-leaves i:nth-of-type(3n+2)        { height:17px; width:23px; }
.alg-leaves i:nth-of-type(3n+2)::before { height:4px; width:4px; top:12px; right:1px; }
.alg-leaves i:nth-of-type(3n+2)::after  { height:10px; width:2px; top:1px; left:8px; }

.alg-leaves i:nth-of-type(n)   { animation-delay: -1.9s; }
.alg-leaves i:nth-of-type(2n)  { animation-delay: -3.9s; }
.alg-leaves i:nth-of-type(3n)  { animation-delay: -2.3s; }
.alg-leaves i:nth-of-type(4n)  { animation-delay: -4.4s; }
.alg-leaves i:nth-of-type(5n)  { animation-delay: -0.8s; }
.alg-leaves i:nth-of-type(6n)  { animation-delay: -3.5s; }
.alg-leaves i:nth-of-type(7n)  { animation-delay: -2.8s; }
.alg-leaves i:nth-of-type(8n)  { animation-delay: -1.5s; }
.alg-leaves i:nth-of-type(9n)  { animation-delay: -3.3s; }
.alg-leaves i:nth-of-type(10n) { animation-delay: -2.5s; }
.alg-leaves i:nth-of-type(11n) { animation-delay: -1.2s; }
.alg-leaves i:nth-of-type(12n) { animation-delay: -4.1s; }
.alg-leaves i:nth-of-type(13n) { animation-delay: -0.5s; }
.alg-leaves i:nth-of-type(14n) { animation-delay: -4.7s; }
.alg-leaves i:nth-of-type(15n) { animation-delay: -3s;   }

.alg-leaves i:nth-of-type(n)    { background: linear-gradient(to bottom right, var(--hoja-300), var(--hoja-700)); }
.alg-leaves i:nth-of-type(2n+2) { background: linear-gradient(to bottom right, var(--algarrobo-300), var(--algarrobo-600)); }
.alg-leaves i:nth-of-type(4n+1) { background: linear-gradient(to bottom right, var(--algarrobo-200), var(--algarrobo-500)); }

.alg-leaves i:nth-of-type(n)    { opacity: .45; }
.alg-leaves i:nth-of-type(3n+1) { opacity: .28; }
.alg-leaves i:nth-of-type(3n+2) { opacity: .18; }

.alg-leaves i:nth-of-type(n) { transform: skew(20deg) rotate(180deg); }

@keyframes alg-falling {
  0%   { transform: translate3d(300px,0,0) rotate(0deg); }
  100% { transform: translate3d(-350px,700px,0) rotate(90deg); opacity:0; }
}
@keyframes alg-falling2 {
  0%   { transform: translate3d(0,0,0) rotate(-20deg); }
  100% { transform: translate3d(-230px,640px,0) rotate(-70deg); opacity:0; }
}
@keyframes alg-falling3 {
  0%   { transform: translate3d(0,0,0) rotate(90deg); }
  100% { transform: translate3d(-400px,680px,0) rotate(0deg); opacity:0; }
}
@media (prefers-reduced-motion: reduce) { .alg-leaves { display: none; } }
.alg-hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 6.5vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  color: var(--pizarra-900);
}
.alg-hero-title em { font-style: italic; color: var(--algarrobo-700); font-weight: 500; }
.alg-hero-lede {
  font-size: 18px;
  line-height: 1.65;
  color: var(--pizarra-700);
  max-width: 560px;
  margin: 0 0 32px;
}
.alg-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 56px; }
/* Ticker */
.alg-ticker-wrap {
  width: 100%;
  overflow: hidden;
  margin-top: 56px;
  border-top: 1px solid rgba(15,23,42,0.1);
  padding-top: 28px;
  mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
}
.alg-ticker {
  display: flex;
  width: max-content;
  animation: alg-ticker-scroll 28s linear infinite;
}
.alg-ticker:hover { animation-play-state: paused; }
.alg-ticker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 32px;
  white-space: nowrap;
}
.alg-ticker-num {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 600;
  line-height: 1;
  color: var(--pizarra-900);
  letter-spacing: -0.02em;
}
.alg-ticker-label {
  font-size: 12px;
  color: var(--pizarra-500);
  line-height: 1.3;
  max-width: 80px;
}
.alg-ticker-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
  opacity: 0.75;
  filter: grayscale(0.3);
}
.alg-ticker-map {
  height: 44px;
  width: auto;
  object-fit: contain;
  opacity: 0.5;
}
.alg-ticker-pin {
  height: 32px;
  width: 32px;
  opacity: 0.45;
  color: var(--pizarra-600);
}
.alg-ticker-sep {
  font-size: 18px;
  color: var(--pizarra-300);
  margin-left: 16px;
}
@keyframes alg-ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* buttons */
.alg-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-weight: 500;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.alg-btn:active { transform: scale(0.99); }
.alg-btn-sm { padding: 9px 16px; font-size: 13px; }
.alg-btn-block { width: 100%; justify-content: center; }
.alg-btn-primary { background: var(--pizarra-900); color: #FFFFFF; }
.alg-btn-primary:hover { background: var(--pizarra-700); color: #FFFFFF; }
.alg-btn-secondary {
  background: transparent;
  color: var(--pizarra-900);
  border-color: var(--pizarra-900);
}
.alg-btn-secondary:hover { background: var(--pizarra-900); color: var(--pergamino-100); }

/* services */
.alg-services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .alg-services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .alg-services-grid { grid-template-columns: repeat(3, 1fr); } }

.alg-service-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--color-border-subtle);
  border-radius: 12px;
  perspective: 900px;
  cursor: pointer;
  outline: none;
  opacity: 0;
  transform: translateY(28px) scale(0.94);
  transition:
    opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 700ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 200ms ease,
    border-color 200ms ease;
  transition-delay: calc(var(--i, 0) * 90ms);
}
.alg-services-grid.is-active .alg-service-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.alg-service-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: var(--algarrobo-700);
  border-radius: 12px 12px 0 0;
  opacity: 0.55;
  transition: opacity 200ms ease, height 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.alg-service-card:hover,
.alg-service-card:focus-visible {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 18px 40px -16px rgba(15, 23, 42, 0.22);
  transition:
    transform 400ms cubic-bezier(0.34, 1.7, 0.64, 1),
    box-shadow 250ms ease,
    border-color 200ms ease;
}
.alg-service-card:hover::before,
.alg-service-card:focus-visible::before {
  opacity: 1;
  height: 4px;
}
.alg-service-card:hover .alg-service-ico,
.alg-service-card:focus-visible .alg-service-ico {
  color: var(--algarrobo-700);
  transform: scale(1.18) rotate(-4deg);
}
.alg-service-card:hover .alg-service-arrow svg,
.alg-service-card:focus-visible .alg-service-arrow svg {
  transform: translateX(6px);
}
.alg-service-ico {
  width: 32px;
  height: 32px;
  color: var(--pizarra-400);
  margin-bottom: 24px;
  transition: color 250ms ease, transform 400ms cubic-bezier(0.34, 1.7, 0.64, 1);
  transform-origin: center;
}
.alg-service-ico svg { width: 100%; height: 100%; }
.alg-service-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 10px;
  color: var(--pizarra-900);
}
.alg-service-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--pizarra-500);
  margin: 0 0 18px;
}
.alg-service-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--pizarra-900);
}
.alg-service-arrow svg { transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1); }

/* Service flip */
.alg-svc-inner {
  position: relative;
  min-height: 280px;
  transform-style: preserve-3d;
  transition: transform 0.52s cubic-bezier(0.4, 0.2, 0.2, 1);
}
.alg-service-card.is-flipped .alg-svc-inner { transform: rotateY(180deg); }
.alg-service-card.is-flipped:hover,
.alg-service-card.is-flipped:focus-visible {
  transform: translateY(0) scale(1);
  box-shadow: none;
}
.alg-service-card.is-flipped::before { opacity: 0 !important; }
.alg-svc-front,
.alg-svc-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  padding: 32px 28px 28px;
  border-radius: 11px;
}
.alg-svc-back {
  transform: rotateY(180deg);
  background: var(--pergamino-200);
  border: 1px solid var(--pergamino-300);
}
.alg-svc-back-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--pizarra-900);
  margin: 0 0 16px;
  line-height: 1.2;
}
.alg-svc-back-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.alg-svc-back-list li {
  font-size: 13px;
  line-height: 1.5;
  color: var(--pizarra-600);
  padding-left: 16px;
  position: relative;
}
.alg-svc-back-list li::before {
  content: "·";
  position: absolute;
  left: 4px;
  color: var(--algarrobo-400);
  font-size: 18px;
  line-height: 1.2;
}
.alg-svc-back-btn {
  margin-top: 20px;
  background: var(--pizarra-900) !important;
  color: var(--pergamino-100) !important;
  border-color: var(--pizarra-900) !important;
  align-self: flex-start;
}
.alg-svc-back-btn:hover { background: var(--pizarra-700) !important; border-color: var(--pizarra-700) !important; }

/* differentiator / quiénes somos */
.alg-section-about {
  background: var(--pergamino-200);
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}
.alg-diff-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
@media (min-width: 1024px) { .alg-diff-grid { grid-template-columns: 1fr 1.1fr; gap: 64px; } }
.alg-diff-intro .alg-section-title em { color: var(--algarrobo-700); }

/* Araucaria + cordillera nevada — paisaje conceptual chileno */
.alg-tree-wrap {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  aspect-ratio: 720 / 560;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(15, 23, 42, 0.35);
}
.alg-tree { width: 100%; height: 100%; display: block; }

.alg-sky-bg, .alg-mtn-far, .alg-mtn-mid, .alg-clouds, .alg-hillside, .alg-arc-distant {
  opacity: 0;
  transition: opacity 1100ms ease;
}
.alg-tree-wrap.is-active .alg-sky-bg { opacity: 1; transition-delay: 0ms; }
.alg-tree-wrap.is-active .alg-mtn-far { opacity: 1; transition-delay: 200ms; }
.alg-tree-wrap.is-active .alg-mtn-mid { opacity: 1; transition-delay: 400ms; }
.alg-tree-wrap.is-active .alg-clouds { opacity: 0.75; transition-delay: 700ms; }
.alg-tree-wrap.is-active .alg-hillside { opacity: 1; transition-delay: 600ms; }
.alg-tree-wrap.is-active .alg-arc-distant { opacity: 0.55; transition-delay: 1000ms; }

.alg-arc-trunk-shape {
  opacity: 0;
  transform-origin: 484px 470px;
  transform-box: fill-box;
  transform: scaleY(0.05);
  transition: opacity 600ms ease 1100ms, transform 1400ms cubic-bezier(0.22, 1, 0.36, 1) 1100ms;
}
.alg-tree-wrap.is-active .alg-arc-trunk-shape { opacity: 1; transform: scaleY(1); }
.alg-arc-bark { opacity: 0; transition: opacity 800ms ease 2300ms; }
.alg-tree-wrap.is-active .alg-arc-bark { opacity: 1; }

.alg-arc-branch {
  opacity: 0;
  transform: scale(0.3);
  transform-origin: 484px 200px;
  transform-box: fill-box;
  transition: opacity 600ms ease, transform 700ms cubic-bezier(0.34, 1.5, 0.64, 1);
  transition-delay: var(--d, 0ms);
}
.alg-tree-wrap.is-active .alg-arc-branch { opacity: 1; transform: scale(1); }
.alg-arc-needle { stroke: #2A3520; stroke-width: 1.2; stroke-linecap: round; }
.alg-arc-arm { fill: none; stroke-linecap: round; }

@media (prefers-reduced-motion: reduce) {
  .alg-sky-bg, .alg-mtn-far, .alg-mtn-mid, .alg-clouds, .alg-hillside, .alg-arc-distant,
  .alg-arc-trunk-shape, .alg-arc-bark, .alg-arc-branch {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
}

/* Botanical leaf — Nosotros section */
.alg-leaf-wrap {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  aspect-ratio: 280 / 415;
}
.alg-leaf-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.alg-leaf-fill {
  fill: var(--algarrobo-700);
  opacity: 0;
  transition: opacity 1s ease 3.8s;
}
.alg-leaf-wrap.is-active .alg-leaf-fill { opacity: 0.04; }

.alg-leaf-stroke {
  fill: none;
  stroke: var(--algarrobo-700);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.alg-leaf-left   { stroke-width: 1.8; stroke-dasharray: 1000; stroke-dashoffset: 1000; transition: stroke-dashoffset 2s cubic-bezier(0.25,0.1,0.25,1) 0s; }
.alg-leaf-right  { stroke-width: 1.8; stroke-dasharray: 1000; stroke-dashoffset: 1000; transition: stroke-dashoffset 2s cubic-bezier(0.25,0.1,0.25,1) 0.15s; }
.alg-leaf-petiole{ stroke-width: 1.3; stroke-dasharray: 100;  stroke-dashoffset: 100;  transition: stroke-dashoffset 0.6s cubic-bezier(0.4,0,0.2,1) 1.8s; }
.alg-leaf-midrib { stroke-width: 1.2; stroke-dasharray: 500;  stroke-dashoffset: 500;  transition: stroke-dashoffset 1.6s cubic-bezier(0.25,0.1,0.25,1) 2s; }

.alg-leaf-vein {
  fill: none;
  stroke: var(--algarrobo-700);
  stroke-width: 0.85;
  stroke-linecap: round;
  opacity: 0.6;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.25,0.1,0.25,1) calc(3s + var(--vi,0) * 0.13s);
}

.alg-leaf-wrap.is-active .alg-leaf-left,
.alg-leaf-wrap.is-active .alg-leaf-right,
.alg-leaf-wrap.is-active .alg-leaf-petiole,
.alg-leaf-wrap.is-active .alg-leaf-midrib,
.alg-leaf-wrap.is-active .alg-leaf-vein { stroke-dashoffset: 0; }

@media (prefers-reduced-motion: reduce) {
  .alg-leaf-left,.alg-leaf-right,.alg-leaf-petiole,.alg-leaf-midrib,.alg-leaf-vein,.alg-leaf-fill {
    stroke-dashoffset: 0 !important; opacity: 1 !important; transition: none !important;
  }
  .alg-leaf-fill { opacity: 0.04 !important; }
}

/* Diff section CTA */
.alg-diff-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  padding: 13px 26px;
  font-size: 14px;
  font-weight: 500;
  color: var(--pergamino-100);
  background: var(--algarrobo-700);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 18px -4px rgba(61,58,46,0.40);
  transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease, gap 250ms cubic-bezier(0.34,1.56,0.64,1);
}
.alg-diff-cta:hover {
  background: var(--algarrobo-800);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -6px rgba(61,58,46,0.50);
  gap: 14px;
}
.alg-diff-cta:active { transform: translateY(0); }
.alg-diff-cta svg { transition: transform 300ms cubic-bezier(0.34,1.56,0.64,1); }
.alg-diff-cta:hover svg { transform: translateX(4px); }

/* Wave rings */
.alg-diff-cta::before,
.alg-diff-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  border: 2px solid var(--algarrobo-600);
  animation: alg-cta-wave 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  pointer-events: none;
}
.alg-diff-cta::after { animation-delay: 1.2s; }

@keyframes alg-cta-wave {
  0%   { transform: scale(1);    opacity: 0.7; }
  70%  { transform: scale(1.28); opacity: 0;   }
  100% { transform: scale(1.28); opacity: 0;   }
}

@media (prefers-reduced-motion: reduce) {
  .alg-diff-cta::before, .alg-diff-cta::after { animation: none; }
}

/* Team modal — glass + flip cards */
.alg-modal {
  position: fixed; inset: 0;
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms ease;
}
.alg-modal.is-open { opacity: 1; pointer-events: auto; }
.alg-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(239,233,221,0.55);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
}
.alg-modal-content {
  position: relative;
  width: 100%;
  max-width: 1040px;
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  gap: 28px;
  transform: translateY(24px) scale(0.97);
  opacity: 0;
  transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1) 80ms, opacity 350ms ease 80ms;
}
.alg-modal.is-open .alg-modal-content { transform: translateY(0) scale(1); opacity: 1; }

.alg-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  color: var(--pizarra-900);
}
.alg-modal-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 4px 0 0;
  color: var(--pizarra-900);
}
.alg-modal-close {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(15,23,42,0.06);
  border: 1px solid rgba(15,23,42,0.14);
  color: var(--pizarra-700);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 200ms ease, transform 200ms ease, border-color 200ms ease;
}
.alg-modal-close:hover { background: rgba(15,23,42,0.12); border-color: rgba(15,23,42,0.25); transform: rotate(90deg); }

.alg-flip-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  perspective: 1600px;
}
@media (min-width: 768px) { .alg-flip-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }

.alg-flip {
  position: relative;
  height: 460px;
  transform: translateY(20px);
  opacity: 0;
  animation: alg-flip-enter 600ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--enter-delay, 0ms);
}
@keyframes alg-flip-enter {
  to { transform: translateY(0); opacity: 1; }
}
.alg-flip-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
.alg-flip:hover .alg-flip-inner,
.alg-flip:focus-within .alg-flip-inner {
  transform: rotateY(180deg);
}
.alg-flip-face {
  position: absolute; inset: 0;
  border-radius: 20px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,0.08);
  background: linear-gradient(155deg, rgba(247,243,236,0.96) 0%, rgba(239,233,221,0.93) 60%, rgba(232,226,212,0.90) 100%);
  backdrop-filter: blur(18px) saturate(110%);
  -webkit-backdrop-filter: blur(18px) saturate(110%);
  box-shadow: 0 30px 60px -25px rgba(36,27,14,0.35), inset 0 1px 0 rgba(255,255,255,0.7);
  color: var(--pizarra-900);
  display: flex; flex-direction: column;
}
.alg-flip-front {
  padding: 28px 28px 20px;
  align-items: flex-start;
  gap: 20px;
  justify-content: space-between;
}
.alg-flip-photo-front {
  width: 110px !important;
  height: 110px !important;
  border: 3px solid rgba(255,255,255,0.9);
  box-shadow: 0 6px 20px -6px rgba(61,58,46,0.25);
}
.alg-flip-front-body {
  flex: 1;
}
.alg-flip-back {
  transform: rotateY(180deg);
  padding: 0;
}
.alg-flip-back-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(15,23,42,0.2) transparent;
}
.alg-flip-back-scroll::-webkit-scrollbar { width: 6px; }
.alg-flip-back-scroll::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.18); border-radius: 3px; }

.alg-flip-photo {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--algarrobo-500), var(--algarrobo-800));
  border: 2px solid rgba(255,255,255,0.8);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px -8px rgba(36,27,14,0.35);
  flex: none;
}
.alg-flip-photo-sm { width: 56px; height: 56px; }
.alg-flip-initials {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.95);
}
.alg-flip-photo-sm .alg-flip-initials { font-size: 18px; }

.alg-flip-front-meta { width: 100%; }
.alg-flip-role {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--algarrobo-600);
  margin: 0 0 8px;
}
.alg-flip-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 10px;
  color: var(--pizarra-900);
  letter-spacing: -0.01em;
}
.alg-flip-short {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--pizarra-600);
  margin: 0;
}
.alg-flip-hint {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pizarra-400);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15,23,42,0.05);
  border: 1px solid rgba(15,23,42,0.1);
  align-self: flex-end;
  margin: 0 24px 20px;
}

.alg-flip-back-head {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(15,23,42,0.08);
}
.alg-flip-back-head .alg-flip-name { font-size: 18px; margin: 0 0 4px; }
.alg-flip-formation {
  font-size: 12px;
  color: var(--algarrobo-600);
  margin: 0;
  letter-spacing: 0.02em;
}
.alg-flip-bio {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--pizarra-700);
  margin: 0 0 14px;
}
.alg-flip-detail {
  font-size: 13px;
  line-height: 1.65;
  color: var(--pizarra-500);
  margin: 0 0 18px;
}
.alg-flip-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.alg-flip-tag {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15,23,42,0.05);
  border: 1px solid rgba(15,23,42,0.1);
  color: var(--pizarra-700);
  white-space: nowrap;
}
.alg-flip-trajectory {
  font-size: 11px;
  color: var(--pizarra-400);
  margin: 0;
  letter-spacing: 0.02em;
}
.alg-flip-trajectory span {
  display: block;
  font-weight: 600;
  color: var(--pizarra-800);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
  margin-bottom: 4px;
}

@media (max-width: 767px) {
  .alg-flip { height: 440px; }
  .alg-flip:hover .alg-flip-inner { transform: none; }
  .alg-flip.is-flipped .alg-flip-inner { transform: rotateY(180deg); }
}


/* Carrusel de proyectos */
.alg-carrusel-section {
  background: var(--pizarra-900);
  color: var(--pergamino-100);
  padding: 96px 0 80px;
}

.alg-carrusel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}

.alg-carrusel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
  margin-bottom: 40px;
}

.alg-carrusel-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(247,243,236,0.07);
  border: 1px solid rgba(247,243,236,0.18);
  color: var(--pergamino-100);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease;
}
.alg-carrusel-btn:hover { background: rgba(247,243,236,0.16); border-color: rgba(247,243,236,0.35); }

.alg-carrusel-dots { display: flex; gap: 8px; align-items: center; }
.alg-carrusel-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(247,243,236,0.22);
  border: none; padding: 0;
  cursor: pointer;
  transition: background 250ms ease, transform 250ms ease;
}
.alg-carrusel-dot.is-active { background: var(--pergamino-100); transform: scale(1.4); }

.alg-carrusel-slide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
  min-height: 360px;
  margin-bottom: 56px;
}
@media (max-width: 899px) { .alg-carrusel-slide { grid-template-columns: 1fr; gap: 36px; } }

.alg-carrusel-text {
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: alg-enter-left 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.alg-carrusel-foto {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: 0 28px 56px -20px rgba(0,0,0,0.6);
  animation: alg-enter-right 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.alg-carrusel-foto img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

@keyframes alg-enter-left {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes alg-enter-right {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}

.alg-carrusel-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.alg-proyecto-cliente {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--algarrobo-200);
}
.alg-proyecto-año {
  font-size: 11px;
  color: rgba(247,243,236,0.38);
}
.alg-carrusel-titulo {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 500;
  line-height: 1.18;
  color: var(--pergamino-100);
  margin: 0;
  letter-spacing: -0.01em;
}
.alg-carrusel-desc {
  font-size: 16px;
  line-height: 1.72;
  color: rgba(247,243,236,0.68);
  margin: 0;
  max-width: 48ch;
}
.alg-proyecto-metrica {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid rgba(247,243,236,0.1);
}
.alg-proyecto-num {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  color: var(--pergamino-100);
  line-height: 1;
  letter-spacing: -0.02em;
}
.alg-proyecto-num-label {
  font-size: 13px;
  color: rgba(247,243,236,0.5);
  line-height: 1.4;
}

.alg-clientes-bar {
  border-top: 1px solid rgba(247,243,236,0.1);
  padding-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 768px) { .alg-clientes-bar { flex-direction: row; align-items: center; gap: 32px; } }
.alg-clientes-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247,243,236,0.38);
  white-space: nowrap;
  margin: 0;
}
.alg-clientes-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: rgba(247,243,236,0.65);
}

/* Foto real en flip cards */
.alg-flip-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* contact */
.alg-contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: start;
}
@media (min-width: 1024px) { .alg-contact-grid { grid-template-columns: 1fr 1.1fr; gap: 96px; } }
.alg-contact-list {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.alg-contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--pizarra-700);
}
.alg-contact-list li svg { color: var(--algarrobo-700); flex-shrink: 0; }
.alg-contact-list a:hover { color: var(--algarrobo-700); }

.alg-form {
  background: #fff;
  border: 1px solid var(--color-border-subtle);
  border-radius: 12px;
  padding: 32px;
  display: grid;
  gap: 18px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}
.alg-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 540px) { .alg-field-row { grid-template-columns: 1fr; } }
.alg-field { display: flex; flex-direction: column; gap: 6px; }
.alg-field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--pizarra-700);
}
.alg-field input,
.alg-field select,
.alg-field textarea {
  font: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--pizarra-200);
  background: #fff;
  border-radius: 6px;
  color: var(--pizarra-900);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  font-family: var(--font-body);
}
.alg-field input:focus,
.alg-field select:focus,
.alg-field textarea:focus {
  border-color: var(--pizarra-900);
  box-shadow: 0 0 0 1px var(--pizarra-900);
}
.alg-form-thanks { text-align: center; padding: 32px 16px; color: var(--pizarra-700); }
.alg-form-thanks svg { color: var(--hoja-500); margin: 0 auto 12px; }
.alg-form-thanks h3 { font-family: var(--font-display); font-weight: 500; font-size: 24px; margin: 0 0 6px; color: var(--pizarra-900); }
.alg-form-thanks p { margin: 0; color: var(--pizarra-500); }

/* footer */
.alg-footer {
  background: var(--pizarra-900);
  color: var(--pergamino-100);
  padding: 80px 0 32px;
}
.alg-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 768px) {
  .alg-footer-grid { grid-template-columns: 1fr 1fr; }
  .alg-footer-grid > div:first-child { grid-column: 1 / -1; margin-bottom: 16px; }
}
.alg-footer-logo { height: 140px; width: auto; margin-bottom: 16px; filter: brightness(0) invert(1); opacity: 0.9; }
.alg-footer-tag {
  font-size: 14px;
  color: #FFFFFF;
  line-height: 1.6;
  max-width: 280px;
  margin: 0 0 20px;
}
.alg-footer-mp-logo {
  height: 36px;
  width: auto;
  opacity: 0.6;
  filter: brightness(0) invert(1);
  display: block;
}
.alg-footer-col { display: flex; flex-direction: column; gap: 10px; }
.alg-footer-head {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--algarrobo-200);
  margin: 0 0 6px;
}
.alg-footer-col a {
  font-size: 14px;
  color: #FFFFFF;
  transition: color 150ms ease;
}
.alg-footer-col a:hover { color: var(--pergamino-100); opacity: 0.8; }
.alg-footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: #FFFFFF;
  opacity: 0.85;
}
