:root {
  --bg: #ffffff;
  --bg-subtle: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --line: #cbd5e1;
  --brand: #059669;
  --brand-dark: #047857;
  --warning-bg: #fffbeb;
  --warning-text: #92400e;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  color: var(--brand);
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.section {
  padding: 4.5rem 0;
}

.subtle {
  background: var(--bg-subtle);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.nav-wrap {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.main-nav button,
.main-nav a {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.95rem;
  text-decoration: none;
}

.main-nav button:hover,
.main-nav a:hover {
  color: var(--brand-dark);
}

.main-nav a.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
}

.main-nav a.btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
}

/* ── Lang toggle button ── */
.btn-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border: 1.5px solid var(--brand);
  border-radius: 6px;
  background: transparent;
  color: var(--brand-dark);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.btn-lang:hover {
  background: var(--brand);
  color: #fff;
}

.two-columns {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: start;
}

.hero {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.hero-video {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.hero-video-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #ffffff;
  text-shadow: 0 4px 18px rgba(15, 23, 42, 0.75), 0 1px 2px rgba(15, 23, 42, 0.7);
  width: min(920px, 92vw);
  padding: 1rem;
}

.hero-video-content p {
  margin: 0 0 0.5rem;
  font-size: clamp(1rem, 2vw, 1.4rem);
  letter-spacing: 0.03em;
  font-weight: 600;
}

.hero-video-content h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
  text-transform: none;
}

h1,
h2,
h3 {
  margin: 0 0 0.8rem;
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.lead {
  font-size: 1.05rem;
  color: #334155;
}

.eyebrow {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid #86efac;
  background: #ecfdf5;
  color: var(--brand-dark);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.7rem;
  margin-bottom: 1rem;
}

.pill {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid #6ee7b7;
  background: #f0fdf4;
  color: #065f46;
  font-weight: 700;
  padding: 0.45rem 1rem;
  margin-bottom: 1rem;
}

.muted {
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.62rem 1rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.92rem;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: #ffffff;
}

.btn-outline {
  border-color: var(--line);
  background: #ffffff;
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.btn-soft {
  border-color: var(--line);
  background: #f1f5f9;
  color: var(--text);
}

.code-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
  padding: 1rem;
  color: #334155;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.code-card p {
  margin: 0.5rem 0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.84rem;
}

.stack {
  display: grid;
  gap: 0.9rem;
}

.card,
.offer,
.notice,
.warning,
.project-card,
.legal-highlight {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.card,
.offer,
.notice,
.warning,
.legal-highlight {
  padding: 1rem;
}

.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.project-card img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  display: block;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.project-content {
  padding: 0.9rem;
}

.offers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.offer-main {
  border-color: #6ee7b7;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.16);
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.logo-pill-img {
  width: 100%;
  height: 90px;
  object-fit: contain;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-subtle);
}

.logo-slick {
  margin-top: 2rem;
  padding: 0 2.2rem;
}

.logo-slick .slick-list {
  padding: 0.2rem 0;
}

.logo-slick .slick-track {
  display: flex;
  align-items: center;
}

.logo-slick .slick-slide {
  display: flex !important;
  justify-content: center;
}

.logo-slick .slick-slide > div {
  width: 100%;
  display: flex;
  justify-content: center;
}

.logo-slick div img {
  max-height: 80px;
  max-width: 100%;
  object-fit: contain;
  padding: 0.25rem;
  margin: 0 auto;
}

.logo-slick .slick-prev,
.logo-slick .slick-next {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  z-index: 2;
}

.logo-slick .slick-prev {
  left: -0.35rem;
}

.logo-slick .slick-next {
  right: -0.35rem;
}

.logo-slick .slick-prev:before,
.logo-slick .slick-next:before {
  color: var(--text);
  font-size: 20px;
  opacity: 0.9;
}

.logo-slick .slick-prev:hover,
.logo-slick .slick-next:hover {
  background: var(--bg-subtle);
}

.offer-market-note {
  margin: 0 0 0.9rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #a7f3d0;
  border-left: 4px solid #10b981;
  border-radius: 10px;
  background: #ecfdf5;
}

.offer-market-note p {
  margin: 0 0 0.35rem;
  color: #065f46;
  font-size: 0.92rem;
  line-height: 1.45;
}

.offer-market-note a {
  font-size: 0.86rem;
  font-weight: 600;
  color: #065f46;
}

.offer-market-note a:hover {
  color: #047857;
}

.market-note-section {
  padding: 0 0 1.2rem;
}

.offer-market-note-standalone {
  max-width: 760px;
  margin: 0 auto;
}

.price {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.accent {
  color: #065f46;
  font-weight: 600;
}

.offer ul,
.notice p,
.warning p {
  margin: 0.75rem 0;
}

.narrow {
  width: min(760px, 92vw);
}

.brief-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  font-size: 0.95rem;
  color: var(--text);
  background: #ffffff;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(16, 185, 129, 0.28);
  border-color: #34d399;
}

.warning {
  margin-top: 0.8rem;
  background: var(--warning-bg);
  color: var(--warning-text);
  border-color: #fcd34d;
}

.limites-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  align-items: stretch;
}

.limites-grid > article {
  margin-top: 0;
  height: 100%;
}

.mes-limites {
  margin-top: 1.2rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 14px;
  background: var(--bg-subtle);
}

.mes-limites h3 {
  margin: 0.3rem 0 0.75rem;
  font-size: 1.05rem;
}

.mes-limites ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  display: grid;
  gap: 0.5rem;
}

@keyframes ph-wave {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Portfolio Hero animations ── */
@keyframes ph-fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ph-fade-in {
  from { opacity: 0; }
  to   { opacity: 0.3; }
}

/* ── Portfolio Hero ── */
.portfolio-hero {
  background: linear-gradient(135deg,
    rgba(4,120,87,0.6) 0%,
    rgba(16,185,129,0.35) 33%,
    rgba(4,120,87,0.55) 66%,
    rgba(5,150,105,0.4) 100%
  ), var(--bg-subtle);
  background-size: 300% 300%;
  animation: ph-wave 6s ease infinite;
  padding: 5rem 2rem 4rem;
}

.portfolio-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.portfolio-hero-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-dark);
  margin: 0 0 0.75rem;
  animation: ph-fade-up 0.6s ease both;
  animation-delay: 0.1s;
}

.portfolio-hero-title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 900;
  margin: 0 0 1rem;
  line-height: 1.1;
  color: var(--text);
  animation: ph-fade-up 0.6s ease both;
  animation-delay: 0.25s;
}

.portfolio-hero-sub {
  font-size: 1.05rem;
  color: var(--muted, #64748b);
  margin: 0;
  animation: ph-fade-up 0.6s ease both;
  animation-delay: 0.4s;
}

.portfolio-hero-count {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-shrink: 0;
  animation: ph-fade-up 0.6s ease both;
  animation-delay: 0.55s;
}

.portfolio-hero-number {
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 900;
  line-height: 1;
  color: var(--brand);
  opacity: 0;
  animation: ph-fade-in 0.8s ease forwards;
  animation-delay: 0.7s;
}

.portfolio-hero-unit {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-dark);
  line-height: 1.4;
}

@media (max-width: 600px) {
  .portfolio-hero-inner {
    flex-direction: column;
  }
  .portfolio-hero-count {
    align-self: flex-end;
  }
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #f8fafc;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-wrap {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.legal-page {
  min-height: 100vh;
}

.legal-main {
  padding: 2.5rem 0 3.5rem;
}

.legal-content {
  width: min(880px, 92vw);
  margin: 0 auto;
}

.legal-content section {
  margin-bottom: 1.2rem;
}

.legal-content h2 {
  font-size: 1.2rem;
  margin-top: 1.2rem;
}

.legal-content h3 {
  font-size: 1rem;
}

@media (max-width: 980px) {
  .main-nav {
    display: none;
  }

  .two-columns,
  .projects,
  .offers,
  .limites-grid,
  .grid-two {
    grid-template-columns: 1fr;
  }
    grid-template-columns: 1fr;
  }

  .footer-wrap {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 0.8rem 0;
  }
}
