:root {
  --black: #050506;
  --graphite: #222429;
  --muted: #626872;
  --line: #dfe3e8;
  --soft-line: #edf0f3;
  --surface: #ffffff;
  --surface-muted: #f6f7f9;
  --blue: #0057ff;
  --blue-dark: #003fc4;
  --shadow: 0 14px 34px rgba(5, 5, 6, 0.075);
  --radius: 2px;
  --header-height: 86px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--black);
  font-family: Inter, Arial, Helvetica, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 9% 18%, rgba(0, 87, 255, 0.035), transparent 18%),
    linear-gradient(120deg, transparent 0 58%, rgba(0, 87, 255, 0.025) 58% 58.15%, transparent 58.15%),
    #fff;
}

body.menu-open {
  overflow: hidden;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 40px, 1180px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #d9dde3;
  backdrop-filter: blur(18px);
}

.nav-shell {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: block;
  width: 178px;
}

.brand img {
  width: 100%;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--graphite);
  font-size: 0.8rem;
  font-weight: 700;
}

.site-nav a:not(.btn) {
  position: relative;
  padding-block: 8px;
}

.site-nav a:not(.btn)::after {
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 1px;
  background: var(--blue);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.site-nav a:not(.btn):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.language-selector {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.language-selector button {
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: color 180ms ease;
}

.language-selector button:hover,
.language-selector button.is-active {
  color: var(--blue);
}

.language-selector button.is-active {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--black);
  transition: transform 180ms ease;
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--black);
  border-radius: 0;
  font-size: 0.86rem;
  font-weight: 800;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
  box-shadow: 0 12px 28px rgba(0, 87, 255, 0.18);
}

.btn-secondary {
  background: #fff;
  color: var(--black);
}

.btn-secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.btn-tertiary {
  min-height: 48px;
  border-color: transparent;
  background: transparent;
  color: var(--blue);
  padding-inline: 8px;
}

.btn-tertiary:hover {
  border-color: transparent;
  box-shadow: none;
}

.btn-small {
  min-height: 40px;
  padding-inline: 17px;
}

.section-grid {
  position: relative;
  overflow: hidden;
}

.section-grid::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(5, 5, 6, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 5, 6, 0.035) 1px, transparent 1px);
  background-size: 110px 110px;
  mask-image: linear-gradient(90deg, transparent, #000 45%, #000 100%);
}

.hero {
  min-height: 0;
  padding: 50px 0 0;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(460px, 1.02fr);
  align-items: stretch;
  gap: 24px;
  min-width: 0;
}

.hero-copy {
  align-self: center;
  min-width: 0;
  padding-bottom: 48px;
  overflow: visible;
}

.eyebrow,
.section-kicker {
  position: relative;
  margin: 0 0 18px;
  color: var(--graphite);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::after,
.section-kicker::after {
  display: block;
  width: 34px;
  height: 2px;
  margin-top: 14px;
  background: var(--blue);
  content: "";
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(3rem, 5.2vw, 5.55rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

:lang(es) h1 {
  max-width: 760px;
  font-size: clamp(2.85rem, 4.75vw, 5rem);
}

.hero-subhead {
  margin-bottom: 24px;
  color: var(--blue);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-description {
  max-width: 500px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.16rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-visual {
  position: relative;
  min-height: 420px;
  min-width: 0;
  max-width: 100%;
  border-left: 0;
  overflow: hidden;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 420px;
  object-fit: cover;
  object-position: center right;
  filter: saturate(0.84) contrast(1.04);
}

.hero-visual::before,
.hero-visual::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.hero-visual::before {
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.08) 30%, rgba(255, 255, 255, 0) 60%);
}

.hero-visual::after {
  right: 8%;
  bottom: 12%;
  width: 36%;
  height: 1px;
  background: var(--blue);
  box-shadow: -180px -190px 0 rgba(0, 87, 255, 0.9), 70px -320px 0 rgba(0, 87, 255, 0.7);
}

.blue-trace {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  border: 1px solid rgba(0, 107, 255, 0.72);
}

.trace-one {
  right: 13%;
  top: 18%;
  width: 128px;
  height: 96px;
  border-left: 0;
  border-bottom: 0;
}

.trace-two {
  right: 38%;
  bottom: 18%;
  width: 190px;
  height: 78px;
  border-right: 0;
}

.trace-three {
  right: 4%;
  bottom: 34%;
  width: 1px;
  height: 210px;
  border-width: 0 1px 0 0;
}

.service-strip {
  padding: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.service-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-inline: 1px solid var(--line);
}

.highlight-card,
.service-card,
.tech-card,
.development-grid article,
.why-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.highlight-card {
  min-height: 132px;
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: auto 1fr;
  gap: 18px;
  padding: 28px 30px;
  border-width: 0 1px 0 0;
  border-radius: 0;
}

.highlight-card:last-child {
  border-right: 0;
}

.highlight-card:hover,
.service-card:hover,
.development-grid article:hover,
.tech-card:hover {
  border-color: rgba(0, 107, 255, 0.42);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.line-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 0;
  place-items: center;
  color: var(--black);
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color 180ms ease, color 180ms ease;
  grid-row: 1 / span 2;
}

.highlight-card:hover .line-icon {
  color: var(--blue);
  border-color: rgba(0, 107, 255, 0.45);
}

.line-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.highlight-card h2,
.service-card h3,
.tech-card h3,
.development-grid h3,
.why-grid h3 {
  margin-bottom: 8px;
  font-size: 0.92rem;
  line-height: 1.25;
}

.highlight-card p,
.why-grid p,
.development-grid p,
.contact-panel p,
.site-footer p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.highlight-card p {
  grid-column: 2;
}

.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

.section-muted {
  background:
    linear-gradient(135deg, rgba(0, 87, 255, 0.025), transparent 34%),
    var(--surface-muted);
}

.about {
  position: relative;
  overflow: hidden;
  background: #fff;
}

.about-architecture {
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(28vw, 330px);
  height: 100%;
  opacity: 0.34;
  background: url("assets/images/fzn-labs-architecture-hero.png") center left / cover no-repeat;
  filter: grayscale(1);
  pointer-events: none;
}

.two-column {
  display: grid;
  position: relative;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 76px;
}

.section h2 {
  max-width: 680px;
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3vw, 3.1rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
}

.section-body {
  color: var(--graphite);
  font-size: 1.05rem;
}

.section-body p {
  color: var(--muted);
}

.section-body p + p {
  margin-top: 18px;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 34px;
}

.value-grid span {
  padding: 15px 16px;
  border-left: 2px solid var(--blue);
  background: #fff;
  color: var(--black);
  font-weight: 800;
}

.section-heading {
  display: grid;
  gap: 8px;
  max-width: 820px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading .section-kicker::after {
  margin-inline: auto;
}

.card-grid,
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.service-card {
  padding: 26px;
}

.service-card ul {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.service-card li {
  position: relative;
  padding-left: 17px;
}

.service-card li::before {
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 5px;
  background: var(--blue);
  content: "";
}

.development-section {
  position: relative;
  overflow: hidden;
  background: #fff;
}

.development-section::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(5, 5, 6, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 5, 6, 0.03) 1px, transparent 1px);
  background-size: 110px 110px;
  mask-image: linear-gradient(90deg, #000, transparent 64%);
}

.development-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 52px;
  align-items: center;
}

.development-copy h2 {
  margin-bottom: 20px;
}

.development-copy h3 {
  max-width: 580px;
  margin-bottom: 18px;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1.18;
}

.development-copy p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.development-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.development-grid article {
  min-height: 230px;
  padding: 26px;
}

.development-grid article::before {
  display: block;
  width: 34px;
  height: 2px;
  margin-bottom: 22px;
  background: var(--blue);
  content: "";
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.tech-card {
  padding: 26px;
}

.tech-card-wide {
  grid-column: span 4;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--graphite);
  font-size: 0.88rem;
  font-weight: 700;
}

.why-grid article {
  min-height: 190px;
  padding: 26px;
  background: #fff;
  border-color: var(--line);
}

.why-grid article:hover {
  border-color: rgba(0, 107, 255, 0.72);
}

.contact-section {
  background: #fff;
}

.contact-panel {
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: 60px;
  align-items: center;
  min-height: 310px;
  padding: 52px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78)),
    url("assets/images/fzn-labs-architecture-hero.png") right center / 43% auto no-repeat,
    #fff;
}

.contact-panel h2 {
  margin-bottom: 18px;
}

.contact-actions {
  display: grid;
  gap: 28px;
  padding-left: 42px;
  border-left: 1px solid rgba(0, 87, 255, 0.48);
}

.contact-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  display: grid;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--soft-line);
}

.contact-list span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-list a {
  overflow-wrap: anywhere;
  font-weight: 800;
}

.contact-list a:hover {
  color: var(--blue);
}

.site-footer {
  padding: 28px 0;
  background: var(--black);
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr auto auto;
  gap: 42px;
  align-items: center;
}

.footer-brand {
  width: 172px;
}

.site-footer p,
.copyright {
  color: rgba(255, 255, 255, 0.62);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  font-weight: 800;
}

.site-footer nav a:hover {
  color: #fff;
}

.copyright {
  justify-self: end;
  font-size: 0.9rem;
}

@media (max-width: 1040px) {
  .hero-grid,
  .two-column,
  .development-layout,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 460px;
    border-left: 0;
  }

  .hero-visual img {
    min-height: 460px;
  }

  .service-strip-grid,
  .card-grid,
  .development-grid,
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tech-card-wide {
    grid-column: span 2;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .copyright {
    justify-self: start;
  }
}

@media (max-width: 920px) {
  .menu-toggle {
    display: block;
    position: relative;
    z-index: 30;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-height) 0 auto;
    display: grid;
    gap: 0;
    padding: 10px 14px 18px;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-116%);
    transition: transform 220ms ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
  }

  .site-nav a {
    padding: 15px 4px;
  }

  .site-nav .btn {
    margin-top: 8px;
  }

  .language-selector {
    justify-content: start;
    padding: 15px 4px;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 70px;
  }

  .container {
    width: min(100% - 28px, 1180px);
  }

  .hero {
    min-height: auto;
    padding: 58px 0 46px;
  }

  h1 {
    font-size: clamp(2.85rem, 13vw, 5rem);
    max-width: 100%;
  }

  :lang(es) h1 {
    font-size: clamp(2.25rem, 10.3vw, 4.3rem);
  }

  .hero-subhead {
    font-size: 0.92rem;
    letter-spacing: 0.12em;
  }

  :lang(es) .hero-subhead {
    font-size: clamp(0.72rem, 3.25vw, 0.84rem);
    line-height: 1.45;
    letter-spacing: 0.05em;
    overflow-wrap: normal;
  }

  .hero-description {
    max-width: 100%;
    font-size: 0.96rem;
    line-height: 1.55;
  }

  .hero-grid {
    gap: 38px;
  }

  .hero-visual,
  .hero-visual img {
    min-height: 360px;
  }

  .hero-actions,
  .hero-actions .btn {
    width: 100%;
  }

  .service-strip {
    padding-bottom: 52px;
  }

  .service-strip-grid,
  .card-grid,
  .development-grid,
  .tech-grid,
  .why-grid,
  .value-grid {
    grid-template-columns: 1fr;
  }

  .tech-card-wide {
    grid-column: auto;
  }

  .section {
    padding: 76px 0;
  }

  .two-column,
  .contact-panel {
    gap: 34px;
  }

  .contact-panel {
    padding: 28px;
  }

  .footer-grid {
    gap: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
